<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title></title>
    <link rel="stylesheet" href="/css/element.css" />
</head><link rel="stylesheet" href="/css/element.css">

<script src="/js/Vue.js"></script>
<script src="/js/element.js"></script>
<script src="/js/axios.js"></script>
<script src="/js/formDataUtils.js"></script>
<script src="/js/jquery.min.js"></script>
<style>
    #tools .el-card__body {
        padding: 5px 5px 5px 20px;
    }
    .el-link {
        margin-right:8px;
    }
    #tools .el-button {
        padding: 10px 8px 10px 5px;
    }
    #template {
        height:100%;
    }
    /* #search .el-card__body {
        height:40px;
    } */
    #table {
        height:calc(100% - 120px);
    }
    /*翻页样式*/
    .el-pagination {
        margin-top:5px;
    }
    #tools .el-button {
        padding: 10px 8px 10px 5px;
        background-color:whitesmoke !important;
        color: black !important;
        border: none !important;
      }
      .el-form-item label{
        text-align: left !important;
        width: 68px !important;
        vertical-align: middle;
        float: left;
        font-size: 14px;
        color: #606266;
        line-height: 40px;
        padding: 0 12px 0 0;
        -webkit-box-sizing: border-box;
        box-sizing: border-box;
      }
</style>
<div id="template">
    <!--    用户编辑框-->
    <el-card class="box-card" id="search" >
        <el-form :inline="true" class="demo-form-inline">
            <el-form-item label="用户名称">
                <el-input clearable placeholder="请输入用户名" style="width:200px;" id="asName" v-model="asName" @change="setParam"></el-input>
            </el-form-item>
            <el-form-item label="用户昵称">
              <el-input clearable placeholder="请输入昵称" style="width:200px;" id="nickName" v-model="nkName" @change="setParam"></el-input>
          </el-form-item>
          <el-button size="small" @click="addNew">增加
          </el-button>
        </el-form>
</div>
<script>
    Vue.config.productionTip = false;//屏蔽提示信息
    //当前编辑的场景数据
    var sceneData = {};
    //场景id
    var sceneId;
    var tem = new Vue({
        el: "#template",
        data() {
            return {
                asName:"",
                nkName:""
            }
        },methods:{
            setParam(){
                parent.addusername = this.asName;
                parent.addnickname = this.nkName;
                //console.log(parent.parent);
                //console.log(typeof(parent.parent))
                //console.log(parent.parent.addname);
            },
            addNew()
            {
                if(this.asName&&this.nkName)
                {
                parent.layer.close(parent.addwindow);
                }
                else 
                {
                    alert('用户名/昵称不能为空');
                }
            }
        }

    })
</script>

</html>
